import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
import { IsNotEmpty, IsString, Length } from 'class-validator';

@Entity()
export class Sentence {
    @PrimaryGeneratedColumn()
    id: number;
    @Column({ default: '' })
    title: string;
    @Column({ default: '' })
    description: string;
    @Column({ default: 'zh' })
    language: string; // 语言
    @Column({ default: '' })
    source: string; // 来源
    @Column({ default: false })
    deleted: boolean; // 是否删除
    @Column({ default: '' })
    createdBy: string; // 创建人
    @Column({ default: '' })
    updatedBy: string; // 更新人
    @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
    createdAt: Date;
    @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP', onUpdate: 'CURRENT_TIMESTAMP' })
    updatedAt: Date;
}